//
//  SYTitleTableViewCell.m
//  SanYiTeaching
//
//  Created by 郑浩然 on 2019/4/30.
//  Copyright © 2019年 SanYi. All rights reserved.
//

#import "SYTitleTableViewCell.h"

@interface SYTitleTableViewCell ()
@property (weak, nonatomic) IBOutlet UILabel *titleLab;
@property (weak, nonatomic) IBOutlet UIButton *addBtn;
@property (weak, nonatomic) IBOutlet UIView *jifenView;

@end


@implementation SYTitleTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}


- (void)titleTableViewCellModel:(SYjiaoYanListModel *)listmodel cont:(id)contModel {
    if (listmodel.type == SYJiaoyanModelTypeJiaoYanJiLu) {
        self.titleLab.text = @"教研记录";
        self.jifenView.hidden = YES;
        self.addBtn.hidden = NO;
    } else {
        self.jifenView.hidden = NO;
        self.addBtn.hidden = YES;
        self.titleLab.text = @"教研成果";
    }
    
    
}

- (IBAction)selectBtnClick:(UIButton *)sender {
    
}
- (IBAction)tiaozhuanBtnClick:(UIButton *)sender {
    NSInteger tag = sender.tag;
    SYTitleTableViewCellType type = -1;
    if (tag == 60) {//添加记录
        type = SYTitleTableViewCellTypeTianJiLu;
    } else {//积分奖励
        type = SYTitleTableViewCellTypeJiFen;
    }
    if (self.block) {
        self.block(type);
    }
    
}

@end

















